<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    <ul>
        <li>鱼香肉丝</li>
        <li>宫保鸡丁</li>
        <li>糖醋里脊</li>
        <li>凉拌黄瓜</li>
    </ul>
    <script>
        var lis=document.getElementsByTagName('li');
        console.log(lis);
        for (var i=0; i<lis.length; i++){
            console.log(lis[i]);
        }
    </script>
</body>
</html>